package org.devgframwork.datasync.admin.rabbit.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.devgframwork.datasync.admin.rabbit.dao.SqlConfigMapper;
import org.devgframwork.datasync.core.entity.SqlConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SqlConfigService extends ServiceImpl<SqlConfigMapper, SqlConfig> {

    @Autowired
    private SqlConfigMapper sqlConfigMapper;

    /**
     * 查询未删除的Sql 数据
     *
     * @return
     */
    public List<SqlConfig> getSqlConfigList() {
        QueryWrapper<SqlConfig> queryWrapper = new QueryWrapper();
        queryWrapper.eq("IS_DELETE", 0);
        return sqlConfigMapper.selectList(queryWrapper);
    }
}
